<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="CarreiraSalarioItemCreateDlg" widgetVar="CarreiraSalarioItemCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateCarreiraSalarioItemTitle}" closeOnEscape="true">

            <h:form id="CarreiraSalarioItemCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2">


                        <p:outputLabel value="#{bundle.CreateCarreiraSalarioItemLabel_carreira}" for="carreira" />
                        <h:panelGroup>
                            <p:selectOneMenu id="carreira" value="#{carreiraSalarioItemController.selected.carreira}"  converter="colaboradorCarreiraConverter">
                                <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                                <f:selectItems value="#{colaboradorCarreiraController.items}"
                                               var="carreiraItem"
                                               itemValue="#{carreiraItem}"
                                               itemLabel="#{carreiraItem.id.toString()}"
                                               />

                            </p:selectOneMenu>
                            <p:tooltip for="carreira" value="#{carreiraSalarioItemController.getComponentMessages('carreira', bundle.CreateCarreiraSalarioItemHelpText_carreira)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.CreateCarreiraSalarioItemLabel_salario}" for="salario" />
                        <h:panelGroup>
                            <p:inputText id="salario" value="#{carreiraSalarioItemController.selected.salario}" title="#{bundle.CreateCarreiraSalarioItemTitle_salario}"/>
                            <p:tooltip for="salario" value="#{carreiraSalarioItemController.getComponentMessages('salario', bundle.CreateCarreiraSalarioItemHelpText_salario)}"/>
                        </h:panelGroup>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{carreiraSalarioItemController.saveNew}" value="#{bundle.Save}" update="display,:CarreiraSalarioItemListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,CarreiraSalarioItemCreateDialog);">
                        <p:confirm header="#{bundle.ConfirmationHeader}" message="#{bundle.ConfirmCreateMessage}" icon="ui-icon-alert"/>
                    </p:commandButton>

                    <p:commandButton value="#{bundle.Cancel}" onclick="CarreiraSalarioItemCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
